buffer: add description about evacuate chunk feature#583
Merged
kenhys merged 1 commit intofluent:1.0from Aug 1, 2025
Merged
Conversation
Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
50d836f to
83de68b
Compare
daipom
added a commit
to fluent/fluentd
that referenced
this pull request
Jun 4, 2025
**Which issue(s) this PR fixes**: None. **What this PR does / why we need it**: Add feature to evacuate chunk files when retry limit. When reached the retry limit, `buf_file` and `buf_file_single` evacuates all the chunk files (and the meta files) in the queue to the following dir before purging. * `(root_dir)/buffer/(plugin-id)/` `root_dir` is `system_config.root_dir` if it is configured. Otherwise, `DEFAULT_BACKUP_DIR` is applied. (`/tmp/fluent`. We can change this by env var `FLUENT_BACKUP_DIR`) There is no separate directory for each worker because the IDs of each chunk are entirely unique. This makes recovery easier. After the problem with the flush (such as a network issue) is resolved, we can put back the files and restart Fluentd to flush them again. ## Difference from the `backup` feature: The `backup` feature is for unrecoverable errors, mainly for bad chunks. On the other hand, this feature is for normal chunks. The main motivation for this feature is to enable recovery by evacuating buffer files when the retry limit is reached due to external factors such as network issues. ## Difference from the `secondary` feature: The `secondary` feature is not suitable for recovery. It can be difficult to recover files made by `out_secondary_file` because the metadata is lost. For file buffers, the easiest way for recovery is to evacuate the chunk files as is. Once the issue is recovered, we can put back the chunk files, and restart Fluentd to load them. This feature enables it. **Docs Changes**: fluent/fluentd-docs-gitbook#583 **Release Note**: Same as the title. Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For fluent/fluentd#4986
https://docs.fluentd.org/buffer#handling-successive-failures